package com.aspire.nm.component.miniServerDemo.server.plugins;

import com.aspire.nm.component.commonUtil.commonCache.CacheUtil;
import com.aspire.nm.component.miniServer.plugin.IfCacher;
import com.aspire.nm.component.miniServer.protocol.Response;


public class MyIfCacher implements IfCacher {

    private CacheUtil cacheUtil;
    public MyIfCacher(){
        cacheUtil = new CacheUtil();
    }
    
    @Override
    public boolean put(String key, Response obj, int time) {
        System.out.println("key = " + key+",obj="+obj);
        return cacheUtil.put(key, obj, (long)time);
    }

    @Override
    public Response get(String key) {
        return (Response)cacheUtil.get(key);
    }

    @Override
    public void start() {
    }

    @Override
    public void release() {
    }

}
